All Functions Used on PO33Q

scale_color_manual

{ggplot2}

Manually sets the colours used in a ggplot color scale to user-specified values

rnorm

{base}

Generate random numbers from a normal distribution

which

{base}

return indexes of TRUE entries of a logical vector

na.omit

{stats}

Remove missing values

ordered

{dplyr}

Create an ordered factor

group_tt

{tinytable}

Grouping in tinytable

sample

{base}

Takes a sample of the specified size

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

names

{base}

Get or set names of an object

vcovSCC

{plm}

Computes Driscoll and Kraay (SCC) robust covariance matrix estimators for panel models

ifelse

{base}

Return a or b depending on the value of test

is.na

{base}

Check if a value is NA/elements of vector are NA

setwd

{base}

Set Working Directory

order

{base}

Get indexes that will sort a vector

factor

{base}

Create a factor

max

{base}

Get maximum of a vector

log

{base}

log (default base = e)

plot

{graphics}

Generic function from base R to produce a plot

lm

{stats}

Fit linear models using least squares

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

as.data.frame

{base}

Functions to check if an object is a data frame, or coerce it if possible.

seq

{base}

Create a sequence

binomial

{base}

Family argument in glm()

plm

{plm}

Estimates linear panel data models (fixed effects, random effects, pooling, between, first-differences)

modelsummary

{modelsummary}

Creates regression and data tables

list

{base}

Create a list object

length

{base}

Returns number of elements in an object

tibble

{tibble}

A modern data frame from the tidyverse

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

colMeans

{base}

Computes the means of each column of a numeric matrix or data frame

lag

{dplyr}

Shift values in a vector or time series

bar

{base}

Used for annotations, such as “expression(paste(”-“,bar(y)))”

par

{graphics}

Set parameters of the plotting device

complete.cases

{stats}

Find Complete Cases

mean

{base}

Get mean of a vector

dnorm

{stats}

Density distribution for the normal distribution

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

rm

{base}

Remove objects

read_excel

{readxl}

Read an Excel file

head

{utils}

Show first 5 rows of a data frame

min

{base}

Get minimum of a vector

expression

{base}

Used in plots to add symbols to axes

var

{stats}

Calculate variance

pdata.frame

{plm}

Creates a panel data frame, the data structure used by the plm package for panel/longitudinal data

ungroup

{dplyr}

Resolve grouping created with “group_by”

summary

{base}

Obtain summary statistics or detailed regression output

glm

{base}

Fits generalized linear models

cut

{base}

Convert Numeric to Factor

coeftest

{lmtest}

Inference for Estimated Coefficients

predict

{stats}

Generate predicted values from model objects

sd

{stats}

Get standard deviation of a vector

str

{utils}

Get the structure of an R object

filter

{dplyr}

Filter out rows of a data frame according to logical vector

nrow

{base}

Get number of rows of a data frame

factor

{base}

Create factor variables

library

{base}

Load an R package

nobs

{stats}

Return the number of observations in a model object

mutate

{dplyr}

Create new variables

pnorm

{base}

Returns the cumulative distribution function (CDF) of the normal distribution

theme_latex

{tinytable}

A theme for modelsummary/tinytable tables

range

{base}

Return range of values

as.character

{base}

Coerce a vector to character

c

{base}

Combine values/vectors into a vector

data.frame

{base}

Create a data.frame from vectors

median

{stats}

Get median of a vector

quantile

{stats}

Obtain empirical quantiles of a vector

The end!